home *** CD-ROM | disk | FTP | other *** search
Wrap
/* Code: dock.rexx Author: Russell Leighton Revision: 11 Apr 1996 Comments: This is an example usage of MUIRexx to create a dock application. It has some very powerful features that are best discovered by inspection. So have fun :-) */ options results options failat 20 arg comm flag /* Method TAG ID definitions */ Application_OpenConfigWindow = 0x804299ba /* { ULONG MethodID; ULONG flags; }; */ /* TAG ID definitions */ MUIA_Frame = 0x8042ac64 /* V4 i.. LONG */ Draggable = '0x80420b6e' Weight = '0x80421d1f' Window_Borderless = '0x80429b79' Window_DepthGadget = '0x80421923' Window_SizeGadget = '0x8042e33d' Window_DragBar = '0x8042045d' InnerBottom = '0x8042f2c0' InnerLeft = '0x804228f8' InnerRight = '0x804297ff' InnerTop = '0x80421eb6' Group_Spacing = '0x8042866d' Menuitem_Checked = '0x8042562a' Menuitem_Checkit = '0x80425ace' Menuitem_Title = '0x804218be' Selected = '0x8042654b' /* TAG variable definitions */ TRUE = 1 FALSE = 0 address DOCK select when comm = 'MAIN' then call main when comm = 'NET' then call net when comm = 'TERM' then call term when comm = 'UTIL' then call util otherwise call main end exit main: address DOCK item ID WDRG ATTRS Menuitem_Checked dflag = (result=1) if dflag then attributes = Window_DragBar TRUE else attributes = Window_DepthGadget FALSE Window_SizeGadget FALSE Window_DragBar FALSE Window_Borderless TRUE window ID DOCK CLOSE window ID DOCK ATTRS attributes InnerBottom 0 InnerLeft 0 InnerRight 0 InnerTop 0 menu LABEL '"Project"' item COMMAND '"request TITLE About GADGETS OK FILE muidir:about.txt"' PORT DOCK LABEL '"About"' menu LABEL '"Settings"' item COMMAND '"method 'Application_OpenConfigWindow'"' PORT DOCK LABEL '"MUI..."' item ID WDRG COMMAND '"muirexx:demos/dock MAIN DRAG"' LABEL '"Drag"' ATTRS Menuitem_Checkit TRUE Menuitem_Checked dflag endmenu item ATTRS Menuitem_Title '-1' item COMMAND '"quit"' PORT DOCK LABEL '"Quit"' endmenu group HORIZ VIRTUAL ATTRS Group_Spacing 0 button ICON '"muirexx:demos/icons/help"' APP DROP COMMAND '"rexx:help %s"' ATTRS MUIA_Frame 0 button ICON '"muirexx:demos/icons/multiview"' APP DROP COMMAND '"sys:utilities/multiview %s"' PORT '"COMMAND"' ATTRS MUIA_Frame 0 button ICON '"muirexx:demos/icons/preview"' APP DROP COMMAND '"tex:c/preview %s"' PORT '"COMMAND"' ATTRS MUIA_Frame 0 button ICON '"muirexx:demos/icons/edit"' APP DROP COMMAND '"ced %s"' PORT '"COMMAND"' ATTRS MUIA_Frame 0 button ICON '"muirexx:demos/icons/music"' APP DROP COMMAND '"tools:music/Player"' PORT '"COMMAND"' ATTRS MUIA_Frame 0 button ICON '"muirexx:demos/icons/paint"' COMMAND '"tools:graphics/TVPaintJr/TVJunior.picasso"' PORT '"COMMAND"' ATTRS MUIA_Frame 0 button ICON '"muirexx:demos/icons/shell"' COMMAND '"newwsh CNC:0/593/560/240/New/close/alt#714,480,0,0 FROM S:WShell-Startup NAME WShell"' PORT '"COMMAND"' ATTRS MUIA_Frame 0 button ICON '"muirexx:demos/icons/dirutil"' COMMAND '"muirexx:demos/muidir/muidir DOCK"' ATTRS MUIA_Frame 0 button ICON '"muirexx:demos/icons/phone"' COMMAND '"template -hphonebook tools:utilities/template/phonebook"' PORT '"COMMAND"' ATTRS MUIA_Frame 0 button ICON '"muirexx:demos/icons/news"' COMMAND '"UUCP:GRn-2.1/GRn"' PORT '"COMMAND"' ATTRS MUIA_Frame 0 button ICON '"muirexx:demos/icons/mail"' COMMAND '"UUCP:c/Elm"' PORT '"COMMAND"' ATTRS MUIA_Frame 0 switch ID BNET ICON '"muirexx:demos/icons/network"' COMMAND '"muirexx:demos/dock NET"' ATTRS MUIA_Frame 0 switch ID BTRM ICON '"muirexx:demos/icons/term"' COMMAND '"muirexx:demos/dock TERM"' ATTRS MUIA_Frame 0 switch ID BUTL ICON '"muirexx:demos/icons/web"' COMMAND '"muirexx:demos/dock UTIL"' ATTRS MUIA_Frame 0 button ICON '"muirexx:demos/icons/apple"' COMMAND '"apps:ShapeShifter/ShapeShifter"' PORT '"COMMAND"' ATTRS MUIA_Frame 0 endgroup endwindow return net: address DOCK item ID NDRG ATTRS Menuitem_Checked dflag = (result=1) if dflag then attributes = Window_DragBar TRUE else attributes = Window_DepthGadget FALSE Window_SizeGadget FALSE Window_DragBar FALSE window ID WNET CLOSE switch ID BNET ATTRS Selected if result then do window ID WNET ATTRS attributes menu LABEL '"Settings"' item ID NDRG COMMAND '"muirexx:demos/dock NET"' LABEL '"Drag"' ATTRS Menuitem_Checkit TRUE Menuitem_Checked dflag endmenu button COMMAND '"UUCP:s/uupoll"' PORT '"COMMAND"' LABEL 'poll' button COMMAND '"AMITCP:bin/startnet"' PORT '"COMMAND"' LABEL 'startnet' button COMMAND '"AMITCP:bin/stopnet"' PORT '"COMMAND"' LABEL 'stopnet' endwindow end return term: address DOCK item ID TDRG ATTRS Menuitem_Checked dflag = (result=1) if dflag then attributes = Window_DragBar TRUE else attributes = Window_DepthGadget FALSE Window_SizeGadget FALSE Window_DragBar FALSE window ID WTRM CLOSE switch ID BTRM ATTRS Selected if result then do window ID WTRM ATTRS attributes menu LABEL '"Settings"' item ID TDRG COMMAND '"muirexx:demos/dock TERM DRAG"' LABEL '"Drag"' ATTRS Menuitem_Checkit TRUE Menuitem_Checked dflag endmenu button COMMAND '"AMITCP:bin/napsaterm cello"' PORT '"COMMAND"' LABEL 'cello' button COMMAND '"AMITCP:bin/napsaterm soyuz"' PORT '"COMMAND"' LABEL 'soyuz' button COMMAND '"AMITCP:bin/napsaterm sputnik"' PORT '"COMMAND"' LABEL 'sputnik' endwindow end return util: address DOCK item ID UDRG ATTRS Menuitem_Checked dflag = (result=1) if dflag then attributes = Window_DragBar TRUE else attributes = Window_DepthGadget FALSE Window_SizeGadget FALSE Window_DragBar FALSE window ID WUTL CLOSE switch ID BUTL ATTRS Selected if result then do window ID WUTL ATTRS attributes menu LABEL '"Settings"' item ID UDRG COMMAND '"muirexx:demos/dock UTIL DRAG"' LABEL '"Drag"' ATTRS Menuitem_Checkit TRUE Menuitem_Checked dflag endmenu button COMMAND '"tools:Network/AMosaic/AMosaic"' PORT '"COMMAND"' LABEL 'AMosaic' button COMMAND '"tools:Network/CLChat/Client/CLChatGUI"' PORT '"COMMAND"' LABEL 'CLChat' button COMMAND '"tools:Network/Grapevine/GV"' PORT '"COMMAND"' LABEL 'Grapevine' endwindow end return